package com.jlstu.util;

import com.aspose.words.Document;

public class Doc2pdf {

    public static void wordToPdf(String path, String newFilePath) {
        try {
            Document doc = new Document(path);
            doc.save(newFilePath);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) throws Exception {
        Doc2pdf.wordToPdf("C:/Users/jiangli/Desktop/招待事前审批及费用结算审批单.docx", "C:/Users/jiangli/Desktop/招待事前审批及费用结算审批单.pdf");
    }

}
